<template>
  <div class="rule-item">
    <span class="rule-label">每</span>
    <el-form-item prop="durationTime">
      <el-input v-model.number="form.durationTime" class="input-box" type="text" @input="$emit('sanitize', 'durationTime')" />
    </el-form-item>
    <span class="rule-label">小时</span>
    <el-form-item prop="durationPrice">
      <el-input v-model.number="form.durationPrice" class="input-box" type="text" @input="$emit('sanitize', 'durationPrice')" />
    </el-form-item>
    <span class="rule-label">元</span>
  </div>
</template>

<script>
export default { // 导出一个默认的Vue组件
  name: 'DurationRule', // 组件的名称
  props: { // 组件的属性
    form: { // form属性，类型为Object，必填
      type: Object,
      required: true
    }
  }
}
</script>
